import { customAlphabet } from "nanoid";

/**
 * @description 生成12位随机字符串
*/
export function getNanoid(len: number=12, prefix: string="u:") {
  const nanoid = customAlphabet("1234567890abcdefghijklmnopqrstuvwxyz", len);
  return `${prefix}${nanoid()}`;
}

export function routerPrefix(mode: string){
  return mode === 'production' ? '/jedi-admin/' : '/';
}
